﻿@model PNProject.Core.OneContentModel
@{
    ViewBag.Title = "Detail";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
}

<div class="admin_head">
Chỉnh sửa mục @Model.Name
</div>


<div class="admin_content">
<div>
<span style="font-weight:bold; color:Blue;">@Model.Name</span>
</div>
<br />
<br />
<div>
<span style="font-weight:bold; color:Blue;">Nội dung</span>
</div>

@using (Html.BeginForm("Detail", "AdminOneContent", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
        
        @Html.HiddenFor(a=>a.OneContentID)
        @Html.HiddenFor(a => a.XContent);
        
        <textarea class="ckeditor" id="editor1" rows="10" style="width:540px; height:300px; overflow-x:hidden;"></textarea>

        
        <p>
            <input id="feed-submit" type="submit" value="Thay đổi" />
        </p>
    
}
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#feed-submit").click(function () {
            var value1 = CKEDITOR.instances['editor1'].getData();
            $("#XContent").val(value1);
        })
    });
    function confirmAction() {
        var confirmed = confirm("Bạn thực sự muốn thưc hiện thao tách này???");
        return confirmed;
    }
    $(window).load(function () {
        CKEDITOR.instances['editor1'].setData($("#XContent").val());
    });

</script>




</div>
